import 'package:built_collection/built_collection.dart';
import 'package:equatable/equatable.dart';
import 'package:mobile_app.core/core/domain/entities/asset/asset_dialect.dart';
import 'package:mobile_app.core/core/domain/entities/asset/asset_lexical_item_use_case.dart';

sealed class AssetLexicalItem {
  String get id;

  String get title;

  String get translation;

  BuiltMap<AssetDialect, String> get transcriptions;

  BuiltList<AssetLexicalItemUseCase> get useCases;

  String? get imageId;
}

class AssetPhrasalVerb extends Equatable implements AssetLexicalItem {
  const AssetPhrasalVerb({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}

sealed class AssetWord implements AssetLexicalItem {
  int get rank;
}

class AssetAdjective extends Equatable implements AssetWord {
  const AssetAdjective({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  @override
  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}

class AssetAdverb extends Equatable implements AssetWord {
  const AssetAdverb({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  @override
  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}

class AssetConjunction extends Equatable implements AssetWord {
  const AssetConjunction({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  @override
  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}

class AssetNoun extends Equatable implements AssetWord {
  const AssetNoun({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  @override
  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}

class AssetNumeral extends Equatable implements AssetWord {
  const AssetNumeral({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  @override
  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}

class AssetPreposition extends Equatable implements AssetWord {
  const AssetPreposition({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  @override
  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}

class AssetPronoun extends Equatable implements AssetWord {
  const AssetPronoun({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  @override
  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}

class AssetVerb extends Equatable implements AssetWord {
  const AssetVerb({
    required this.id,
    required this.title,
    required this.translation,
    required this.transcriptions,
    required this.useCases,
    required this.imageId,
    required this.rank,
  });

  @override
  final String id;

  @override
  final String title;

  @override
  final String translation;

  @override
  final BuiltMap<AssetDialect, String> transcriptions;

  @override
  final BuiltList<AssetLexicalItemUseCase> useCases;

  @override
  final String? imageId;

  @override
  final int rank;

  @override
  List<Object?> get props {
    return [
      id,
      title,
      translation,
      transcriptions,
      useCases,
      imageId,
      rank,
    ];
  }
}
